<!--报个bug页面-->
{% extends 'personalLayout.html' %}
{% load static %}
{% block title %}
    <title>愉快地报个BUG吧</title>
{% endblock %}
{% block css %}
    <link rel="stylesheet" href="{% static 'css/reportBug.css' %}">
{% endblock %}
{% block content %}
    <!-- Modal -->
    <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">创建一条Bug记录</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <form method="POST" id="bug-report">
                        <label for="bug">您遇到了什么问题？</label><textarea name="bug" class="form-control" id="bug" cols="30"
                                                                    rows="10"></textarea>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="submit-bug">提交这个Bug</button>
                </div>
            </div>
        </div>
    </div>
    <div class="my-box">
        <div class="my-title">
            <h2 style="font-weight: bold;">开发者虽然不易，但是Bug该修还得修 —— 某不知名开发者 <i class="fa fa-thumbs-o-up"></i></h2>
            <!-- Button trigger modal -->
            <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
                创建一条Bug记录
            </button>
        </div>
        <div class="the-bug">
            <p style="font-size: 1.2rem;font-weight: bold;">Dylan —— 今天的早些时候</p>
            <div class="alert alert-danger" role="alert">
                请在此愉快地记录Bug吧！
            </div>
        </div>
        {% for que in question %}
            <div class="the-bug">
                <p style="font-size: 1.2rem;font-weight: bold;">{{ que.username }} —— {{ que.create_time }}</p>
                <div class="alert alert-danger" role="alert">
                    {{ que.question }}
                </div>
            </div>
        {% endfor %}
        <div class="my-page-div">
            {{ div }}
            <ul class="pagination page">
                {% for li in page_list %}
                    {{ li }}
                {% endfor %}
            </ul>
        </div>
    </div>
{% endblock %}
{% block js %}
    <script src="{% static 'js/reportBug.js' %}"></script>
{% endblock %}